#pragma comment(lib,"d3d9.lib")
#pragma comment(lib,"d3dx9.lib")
#pragma comment(lib,"RegClass.lib")
extern "C" _declspec(dllimport) BOOL RegClass(HINSTANCE, LPCTSTR, LPCTSTR, WNDPROC);
LPDIRECT3D9 d3d;
LPDIRECT3DDEVICE9 d3ddev;
LPDIRECT3DVERTEXBUFFER9 vertexBuffer;
LPDIRECT3DINDEXBUFFER9 indexBuffer;
#define CUSTOMFVF (D3DFVF_NORMAL|D3DFVF_XYZ)
struct CUSTOMVERTEX { float x, y, z; float nx,ny,nz; };

D3DLIGHT9 lightPoint;
D3DLIGHT9 lightDirection;
D3DLIGHT9 lightSpot;
D3DMATERIAL9 mate;
LPD3DXFONT font;
RECT fontRect;
int isLight = 1;
float rotate = 0.0f;
float tx = 0.0f, ty = 0.0f, tz = 0.0f;